<template>
    <div>
         姓名：<input v-model="fullname" type="text">
    </div>
</template>

<script>
export default {
    name: 'VuBaseApp',

    data() {
        return {
            firstname:'李',
            lastname:'古拉斯'
        };
    },
    computed:{
        fullname:{
            set(val){
                this.lastname=val.substr(1)
            },
            get(){
                return this.firstname+this.lastname
            }
        }
    },

    mounted() {
        
    },

    methods: {
        
    },
};
</script>

<style lang="scss" scoped>

</style>